//
//  ThemeManager.m
//  夜间模式
//
//  Created by Burn on 2018/10/19.
//  Copyright © 2018年 buren. All rights reserved.
//

#import "ThemeManager.h"

static ThemeManager *theme;

@implementation ThemeManager

+ (instancetype)shareInstance{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        theme = [[ThemeManager alloc]init];
    });
    return theme;
}


- (void)setNight:(BOOL)night{
    
    if (_night != night) {
        _night = night;
    }
    if (self.isNight) {
        self.themeNormalColor = [UIColor colorWithRed:0.63 green:0.63 blue:0.63 alpha:1];
        self.themeBlackColor = [UIColor darkGrayColor];
        self.themeRedColor = [UIColor colorWithRed:1.06 green:0.31 blue:0.24 alpha:1];
        
    }else{
        self.themeNormalColor = [UIColor whiteColor];
        self.themeBlackColor = [UIColor blackColor];
        self.themeRedColor = [UIColor colorWithRed:211 / 255.0 green:19 / 255.0 blue:65 / 255.0 alpha:1];

    }
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        self.themeClearColor = [UIColor clearColor];
    });
}

@end
